<html>
<head><meta charset="utf-8"><title>if-let guard point to wrong tracking issue · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html">if-let guard point to wrong tracking issue</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203576275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203576275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203576275">(Jul 11 2020 at 02:31)</a>:</h4>
<p>I created a bug here: <a href="https://github.com/rust-lang/rust/issues/74232">https://github.com/rust-lang/rust/issues/74232</a></p>



<a name="203799084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203799084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203799084">(Jul 14 2020 at 05:03)</a>:</h4>
<p>It seems that if-let guard is just AST item, not yet representable in HIR: <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.Guard.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.Guard.html</a><br>
If I want to fix this, what steps should I follow? @estebank</p>



<a name="203799088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203799088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203799088">(Jul 14 2020 at 05:04)</a>:</h4>
<p><span class="user-mention" data-user-id="119031">@Esteban Küber</span></p>



<a name="203799141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203799141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203799141">(Jul 14 2020 at 05:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span></p>



<a name="203804019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203804019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203804019">(Jul 14 2020 at 07:01)</a>:</h4>
<p>does HIR have <code>ExprKind::Let</code>?</p>



<a name="203804073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203804073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203804073">(Jul 14 2020 at 07:02)</a>:</h4>
<p>(looks like no)</p>



<a name="203806760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203806760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203806760">(Jul 14 2020 at 07:48)</a>:</h4>
<p>the last attempts was <a href="https://github.com/rust-lang/rust/pull/68577">https://github.com/rust-lang/rust/pull/68577</a></p>



<a name="203806763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203806763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203806763">(Jul 14 2020 at 07:48)</a>:</h4>
<p>but I think there were some problems with it</p>



<a name="203806767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203806767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203806767">(Jul 14 2020 at 07:48)</a>:</h4>
<p>I think first we need to reintroduce <code>ExprKind::If</code> or sth?</p>



<a name="203810176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203810176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203810176">(Jul 14 2020 at 08:35)</a>:</h4>
<p>In <a href="https://github.com/rust-lang/rust/pull/74315">https://github.com/rust-lang/rust/pull/74315</a>, I used <code>parse_cond_expr</code> instead of <code>parse_expr</code><br>
This help mitigate pointing to wrong tracking issue.</p>



<a name="203834789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/if-let%20guard%20point%20to%20wrong%20tracking%20issue/near/203834789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/if-let.20guard.20point.20to.20wrong.20tracking.20issue.html#203834789">(Jul 14 2020 at 13:47)</a>:</h4>
<p>I think <a href="https://github.com/rust-lang/rust/issues/68577">#68577</a> is about <code>let_chains</code> features rather than if-let guard</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>